package cn.enjoy.anji.controller;

import com.anji.captcha.model.common.ResponseModel;
import com.anji.captcha.model.vo.CaptchaVO;
import com.anji.captcha.service.CaptchaService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author K
 * @date 2020-12-05 20:13
 */
@Controller
public class TestController {

    private CaptchaService captchaService;

    /**
     * http://localhost:8080/captcha/get
     * {
     *     "captchaType": "blockPuzzle"
     * }
     */
    @PostMapping("getPic")
    public ResponseModel get(@RequestBody CaptchaVO captchaVO) {
        return this.captchaService.get(captchaVO);
    }

}
